﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPizaPiola.master" AutoEventWireup="true" CodeFile="frmPedido.aspx.cs" Inherits="frmPedidoABM" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <script language="javascript" type="text/javascript">
        function ValidarCliente(source, arguments) {
            if (arguments.Value < 1) {
                arguments.IsValid = false;
            }
            else {
                arguments.IsValid = true;
            }
        }
        function ValidarArticulo(source, arguments) {
            if (arguments.Value < 1) {
                arguments.IsValid = false;
            }
            else {
                arguments.IsValid = true;
            }
        }
    </script>
    <style type="text/css">
        .style7
        {
            width: 100%;
        }
        .style11
        {
        }
        .style12
        {
            width: 79px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table class="style7">
        <tr>
            <td align="center" colspan="6">
                <asp:Label ID="LblTitulo" runat="server" Font-Bold="True" Font-Italic="True" 
                    Font-Size="Large" Text="Pedidos"></asp:Label>
            </td>
            <td align="center">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style11">
                Fecha de Emision:</td>
            <td>
                <asp:TextBox ID="TextFechaEmision" runat="server"></asp:TextBox>
            </td>
            <td>
                &nbsp;</td>
            <td>
                <asp:Label ID="LblPtoVta" runat="server" Text="Pto.Vta:"></asp:Label>
                <asp:TextBox ID="TextPtoVta" runat="server" Width="38px"></asp:TextBox>
            </td>
            <td>
                <asp:Label ID="LblNumero" runat="server" Text="Numero:"></asp:Label>
                <asp:TextBox ID="TextNumero" runat="server"></asp:TextBox>
            </td>
            <td class="style12">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style11">
                <asp:Label ID="LblLetra" runat="server" Text="Letra:"></asp:Label>
                
            </td>
            <td colspan="3">
                <asp:Label ID="LblCliente" runat="server" Text="Cliente:"></asp:Label>
&nbsp;
                <asp:DropDownList ID="DropClientes" runat="server">
                </asp:DropDownList>
                <asp:CustomValidator ID="CustomValidator1" runat="server" 
                    ClientValidationFunction="ValidarCliente" ControlToValidate="DropClientes" 
                    ErrorMessage="CustomValidator" 
                    onservervalidate="CustomValidator1_ServerValidate">*</asp:CustomValidator>
            </td>
            <td>
                &nbsp;</td>
            <td class="style12">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style11">
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td class="style12">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style11">
                <asp:Label ID="LblArticulo" runat="server" Text="Articulo:"></asp:Label>
            </td>
            <td>
                <asp:DropDownList ID="DropArticulo" runat="server">
                </asp:DropDownList>
            </td>
            <td>
                <asp:CustomValidator ID="CustomValidator2" runat="server" 
                    ClientValidationFunction="ValidarArticulo" ControlToValidate="DropArticulo" 
                    ErrorMessage="Seleccione un articulo valido" 
                    onservervalidate="CustomValidator2_ServerValidate">*</asp:CustomValidator>
            </td>
            <td colspan="2" rowspan="7">
                <asp:GridView ID="Grilla" runat="server" BackColor="LightGoldenrodYellow" 
                    BorderColor="Tan" BorderWidth="1px" CellPadding="2" ForeColor="Black" 
                    GridLines="None">
                    <FooterStyle BackColor="Tan" />
                    <PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" 
                        HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
                    <HeaderStyle BackColor="Tan" Font-Bold="True" />
                    <AlternatingRowStyle BackColor="PaleGoldenrod" />
                </asp:GridView>
            </td>
            <td class="style12">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style11">
                <asp:Label ID="LblCantidad" runat="server" Text="Cantidad:"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="TextCantidad" runat="server"></asp:TextBox>
            </td>
            <td>
                <asp:RangeValidator ID="RangeValidator1" runat="server" 
                    ControlToValidate="TextCantidad" Display="Dynamic" 
                    ErrorMessage="RangeValidator">*</asp:RangeValidator>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="TextCantidad" Display="Dynamic" 
                    ErrorMessage="RequiredFieldValidator">*</asp:RequiredFieldValidator>
            </td>
            <td class="style12">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style11">
                <asp:Label ID="LblPrecioU" runat="server" Text="Precio Unit:"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="TextPrecioU" runat="server" Enabled="False"></asp:TextBox>
            </td>
            <td>
                &nbsp;</td>
            <td class="style12">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style11">
                <asp:Label ID="LblSubTotal" runat="server" Text="Sub-Total:"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="TextSubTotal" runat="server" Enabled="False"></asp:TextBox>
            </td>
            <td>
                &nbsp;</td>
            <td class="style12">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style11">
                &nbsp;</td>
            <td>
                <asp:Button ID="btnAgregar" runat="server" Text="Agregar" />
            </td>
            <td>
                &nbsp;</td>
            <td class="style12">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style11">
                <asp:Label ID="LblTotal" runat="server" Text="Total:"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="TextTotal" runat="server" Enabled="False"></asp:TextBox>
            </td>
            <td>
                &nbsp;</td>
            <td class="style12">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style11">
                <asp:Label ID="LblEstado" runat="server" Text="Estado:"></asp:Label>
            </td>
            <td>
                <asp:DropDownList ID="DropEstado" runat="server">
                </asp:DropDownList>
            </td>
            <td>
                &nbsp;</td>
            <td class="style12">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style11">
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td class="style12">
                &nbsp;</td>
            <td>
                <asp:Button ID="btnAceptar" runat="server" Text="Aceptar" />
                <asp:Button ID="btnCancelar" runat="server" Text="Cancelar" />
            </td>
        </tr>
        <tr>
            <td class="style11" colspan="2">
                <asp:ValidationSummary ID="ValidationSummary1" runat="server" />
            </td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td class="style12">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
    </table>
</asp:Content>

